<?php

namespace App\Observers;

use App\Models\Account;
use App\Models\Clue;

class AccountObserver
{
    public function updated(Account $account)
    {
        if ($account->type != $account->getOriginal('type')) {
            Clue::where('account_id', $account->id)->update([
                'type' => $account->type,
            ]);
        }

    }
}
